package com.pn.taikao.service;

import com.pn.taikao.entity.Paper;

import java.util.List;

public interface PaperService {
    Long createPaper(Paper paper);

    void updatePaper(Paper paper);

    void deletePaper(Long id);

    Paper getById(Long id);

    List<Paper> getByTeacherId(Long teacherId);

    List<Paper> getByCourseId(Long courseId);
    
    /**
     * 根据课程ID查询已发布的试卷
     */
    List<Paper> getPublishedByCourseId(Long courseId);

    List<Paper> list(String name, Long teacherId, Long courseId, int page, int size);

    long count(String name, Long teacherId, Long courseId);
    
    /**
     * 发布试卷
     */
    void publishPaper(Long id);
    
    /**
     * 取消发布试卷
     */
    void unpublishPaper(Long id);
}


